package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchPressureDropReportInfoMapper;
import com.ruoyi.system.domain.DispatchPressureDropReportInfo;
import com.ruoyi.system.service.IDispatchPressureDropReportInfoService;

/**
 * 压降报信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchPressureDropReportInfoServiceImpl implements IDispatchPressureDropReportInfoService 
{
    @Autowired
    private DispatchPressureDropReportInfoMapper dispatchPressureDropReportInfoMapper;

    /**
     * 查询压降报信息
     * 
     * @param pressureDropReportInfoId 压降报信息主键
     * @return 压降报信息
     */
    @Override
    public DispatchPressureDropReportInfo selectDispatchPressureDropReportInfoByPressureDropReportInfoId(Long pressureDropReportInfoId)
    {
        return dispatchPressureDropReportInfoMapper.selectDispatchPressureDropReportInfoByPressureDropReportInfoId(pressureDropReportInfoId);
    }

    /**
     * 查询压降报信息列表
     * 
     * @param dispatchPressureDropReportInfo 压降报信息
     * @return 压降报信息
     */
    @Override
    public List<DispatchPressureDropReportInfo> selectDispatchPressureDropReportInfoList(DispatchPressureDropReportInfo dispatchPressureDropReportInfo)
    {
        return dispatchPressureDropReportInfoMapper.selectDispatchPressureDropReportInfoList(dispatchPressureDropReportInfo);
    }

    /**
     * 新增压降报信息
     * 
     * @param dispatchPressureDropReportInfo 压降报信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchPressureDropReportInfo(DispatchPressureDropReportInfo dispatchPressureDropReportInfo)
    {
        return dispatchPressureDropReportInfoMapper.insertDispatchPressureDropReportInfo(dispatchPressureDropReportInfo);
    }

    /**
     * 修改压降报信息
     * 
     * @param dispatchPressureDropReportInfo 压降报信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchPressureDropReportInfo(DispatchPressureDropReportInfo dispatchPressureDropReportInfo)
    {
        return dispatchPressureDropReportInfoMapper.updateDispatchPressureDropReportInfo(dispatchPressureDropReportInfo);
    }

    /**
     * 批量删除压降报信息
     * 
     * @param pressureDropReportInfoIds 需要删除的压降报信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPressureDropReportInfoByPressureDropReportInfoIds(Long[] pressureDropReportInfoIds)
    {
        return dispatchPressureDropReportInfoMapper.deleteDispatchPressureDropReportInfoByPressureDropReportInfoIds(pressureDropReportInfoIds);
    }

    /**
     * 删除压降报信息信息
     * 
     * @param pressureDropReportInfoId 压降报信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPressureDropReportInfoByPressureDropReportInfoId(Long pressureDropReportInfoId)
    {
        return dispatchPressureDropReportInfoMapper.deleteDispatchPressureDropReportInfoByPressureDropReportInfoId(pressureDropReportInfoId);
    }
}
